% Chakram is a subproject of Hexena - Haskell Executable Analyser
% License:			GPL-3
% Maintainer:		Montez Fitzpatrick
% Stability:		Experimental
% Portability:		GHC
% Module:			Hexena.Data.PEHeader

This is the @IMAGE_NT_HEADERS@ branch of the Portable Executable Format.  

Microsoft has the PE specification document located at:

[doc] <http://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/pecoff_v8.docx>

\begin{code}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
-- | ** IMAGE_NT_HEADERS **
module Hexena.Data.PEHeader
	(
	-- * Data Structures
	  PEHeader(..)
	) where

import Data.Label -- Needs 'fclabels' package
import Data.Word

import Hexena.Data.FileHeader (FileHeader(..))
import Hexena.Data.OptionalHeader (OptionalHeader(..))

data PEHeader = PEHeader
  { 
  -- | 4-byte signature identifying the file as a PE image. The bytes are "PE\0\0"
--    _signature :: Signature
    _signature :: Word32
  -- | IMAGE_FILE_HEADER
  , _fileHeader :: FileHeader
  -- | IMAGE_OPTIONAL_HEADER
  , _optionalHeader :: OptionalHeader
  } deriving (Show, Eq, Ord) 

-- data Signature = Signature
\end{code}
